<%@ page language="java" contentType="text/html; charset=UTF-8"
     pageEncoding="UTF-8"%>
<%@page isELIgnored="false" %>
<html>
<head>
<title>RESTful测试</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript">
function del(){	
	// 获取输入的查询编号
	var id = $("#number").val();	
	$.ajax({
		url : "${pageContext.request.contextPath }/user/"+id,
		type : "DELETE", 
		contentType : "application/json;charset=UTF-8",
		success : function(data){
			alert("返回的data是："+JSON.stringify(data));		
		}
	});
}
</script>
</head>
<body>
    <form>
         编号：<input type="text" name="number" id="number">
	    <input type="button" value="删除" onclick="del()" />
    </form> 
</body>
</html>
